package com.lq.ecoldchain.ui.main.orderlist.order.list

import com.lq.ecoldchain.base.CommonLoadingViewModel
import org.kodein.di.Kodein
import org.kodein.di.android.support.AndroidLifecycleScope
import org.kodein.di.generic.bind
import org.kodein.di.generic.instance
import org.kodein.di.generic.scoped
import org.kodein.di.generic.singleton

/*
*2018/12/26 0026  15:45
*function by lq
*/
val orderKodeinModel = Kodein.Module("MINE_ORDER_DELEGATE"){
    bind<MineOrderViewModel>() with scoped(AndroidLifecycleScope).singleton {
        MineOrderViewModel()
    }
    bind<MineOrderListDelegate>() with scoped(AndroidLifecycleScope).singleton {
        MineOrderListDelegate(
                viewModel = instance(),
                loadingViewModel = CommonLoadingViewModel.instance(context)
        )
    }
}